package com.bdqn.t362.user.servlet;

import com.bdqn.t362.common.utils.JedisUtils;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * @author lqm
 * @ClassName ${NAME}
 * @description: TODO
 */
@WebServlet("/PhoneCodeServlet")
public class PhoneCodeServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String phone = request.getParameter("phone");
        String code = request.getParameter("code");
        HttpSession session = request.getSession();



        if(JedisUtils.getString(phone+code)!=null){//登录成功
            //处理登录成功的业务

        }else{

        }
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
}
